// 表格列
import tagRender from '@/components/aggridCellRenDerer/tagRender.vue'

let tableColumns: any = [
    {
        headerCheckboxSelection: true,
        checkboxSelection: true,
        width: 50,
        showDisabledCheckboxes: false,
        pinned: 'left',
    },
    {
        headerName: '出库单号',
        field: 'stockOutCode',
        width: 150,
    },
    // {
    //     headerName: '收货单位',
    //     field: 'putGoodsDepartment',
    //     width: 150,
    // },
    {
        headerName: '公司',
        field: 'companyName',
        width: 150,
    },
    {
        headerName: '仓库',
        field: 'warehouseName',
        width: 150,
    },
    {
        headerName: '收货公司',
        field: 'deliveryCompanyName',
        width: 150,
    },
    {
        headerName: '收货仓库类型',
        field: 'deliveryWarehouseTypeName',
        width: 200,
    },
    {
        headerName: '收货仓库',
        field: 'deliveryWarehouseName',
        width: 200,
    },
    {
        headerName: '客户',
        field: 'customName',
        width: 150,
    },
    {
        headerName: '客户订单号',
        field: 'customOrderNo',
        width: 200,
    },
    // {
    //     headerName: '布笼',
    //     field: 'shelveName',
    //     width: 200,
    // },
    {
        headerName: '匹数',
        field: 'horseNum',
        width: 200,
    },
    {
        headerName: '重量',
        field: 'weight',
        width: 200,
    },
    // {
    //     headerName: '车牌号',
    //     field: 'carPlate',
    //     width: 200,
    // },
    {
        headerName: '状态',
        field: 'auditState',
        width: 200,
        // valueGetter: (params: any) => {
        //     return params.data.auditState == 0 ?
        //         '待审核'
        //         : params.data.auditState == 1 ?
        //             '审核通过' :
        //             params.data.auditState == 2 ?
        //                 '审核驳回' :
        //                 ''
        // }
        cellRenderer: tagRender,
        cellRendererParams: {
            styleClass: (params: any) => {
                console.log(params)
                return params.auditState == 0
                    ? 'warning'
                    : params.auditState == 1
                        ? 'success'
                        : params.auditState == 2
                            ? 'info'
                            : ''
            },
            text: (params: any) => {

                return params.auditState == 0
                    ? '待审核'
                    : params.auditState == 1
                        ? '审核通过'
                        : params.auditState == 2
                            ? '审核驳回'
                            : ''
            },
            eltagSize: 0,
        },
        filterParams:{
            valueFormatter: function (params: any) {
              return params.value == '0'
                ? '待审核'
                : params.value == '1'
                ? '审核通过'
                : params.value == '2'
                ? '审核驳回'
                : ''
            },
          }
    },
    {
        headerName: '创建人',
        field: 'createName',
        width: 200,
    },
    {
        headerName: '创建时间',
        field: 'createTime',
        width: 200,
    },

]
let tableColumns1: any = [
    {
        headerCheckboxSelection: true,
        checkboxSelection: true,
        width: 50,
        showDisabledCheckboxes: false,
        pinned: 'left',
    },
    {
        headerName: '客户',
        field: 'customName',
        width: 150,
    },
    {
        headerName: '织布单号',
        field: 'planOrderCode',
        width: 150,
    },
    {
        headerName: '坯布编号',
        field: 'greyCode',
        width: 150,
    },
    {
        headerName: '坯布名称',
        field: 'greyName',
        width: 200,
    },
    {
        headerName: '坯布批号',
        field: 'greyBatchNo',
        width: 200,
    },
    {
        headerName: '等级',
        field: 'grade',
        width: 150,
    },
    {
        headerName: '条形码',
        field: 'clothfiyCode',
        width: 150,
    },
    {
        headerName: '原料编号',
        field: 'rawmaterialCode',
        width: 200,
    },
    {
        headerName: '原料名称',
        field: 'rawmaterialName',
        width: 200,
    },
    {
        headerName: '纱批',
        field: 'yarnBatch',
        width: 200,
    },
    {
        headerName: '成品门幅',
        field: 'productWidth',
        width: 200,
    },
    {
        headerName: '成品克重',
        field: 'productGramWeight',
        width: 200,
    },
    {
        headerName: '针寸',
        field: 'workDrum',
        width: 200,
    },
    {
        headerName: '机布号',
        field: 'machineGreyCode',
        width: 200,
    },
    {
        headerName: '匹号',
        field: 'horseNo',
        width: 200,
    },
    {
        headerName: '重量',
        field: 'weight',
        width: 200,
    },
    {
        headerName: '布笼',
        field: 'shelveName',
        width: 200,
    },
]
let tableColumns2: any = [
    {
        headerCheckboxSelection: true,
        checkboxSelection: true,
        width: 50,
        showDisabledCheckboxes: false,
        pinned: 'left',
    },
    {
        headerName: '客户',
        field: 'customName',
        width: 150,
    },
    {
        headerName: '织布单号',
        field: 'planOrderCode',
        width: 150,
    },
    {
        headerName: '客户订单号',
        field: 'customOrderNo',
        width: 150,
    },
    {
        headerName: '坯布编号',
        field: 'greyCode',
        width: 150,
    },
    {
        headerName: '坯布名称',
        field: 'greyName',
        width: 150,
    },
    {
        headerName: '坯布批号',
        field: 'greyBatchNo',
        width: 150,
    },
    {
        headerName: '等级',
        field: 'grade',
        width: 150,
    },
    {
        headerName: '条形码',
        field: 'clothfiyCode',
        width: 150,
    },
    {
        headerName: '原料编号',
        field: 'rawmaterialCode',
        width: 200,
    },
    {
        headerName: '原料名称',
        field: 'rawmaterialName',
        width: 200,
    },
    {
        headerName: '纱批',
        field: 'yarnBatch',
        width: 200,
    },
    {
        headerName: '成品门幅',
        field: 'productWidth',
        width: 200,
    },
    {
        headerName: '成品克重',
        field: 'productGramWeight',
        width: 200,
    },
    {
        headerName: '针寸',
        field: 'workDrum',
        width: 200,
    },
    {
        headerName: '机布号',
        field: 'machineCode',
        width: 200,
    },
    {
        headerName: '匹号',
        field: 'horseNo',
        width: 200,
    },
    {
        headerName: '重量',
        field: 'weight',
        width: 200,
    },
    {
        headerName: '布笼',
        field: 'shelveName',
        width: 200,
    },
    // {
    //     headerName: '检验日期',
    //     field: 'billDate',
    //     width: 200,
    //     // valueGetter: (params: any) => {
    //     //     return params.data.firstName + params.data.lastName;
    //     // } 使用此属性可以对数据进行处理
    // },
]
let tableColumns3: any = [
    {
        headerCheckboxSelection: true,
        checkboxSelection: true,
        width: 50,
        showDisabledCheckboxes: false,
        pinned: 'left',
    },
    {
        headerName: '公司',
        field: 'companyName',
        width: 150,
    },
    {
        headerName: '仓库名称',
        field: 'warehouseName',
        width: 150,
    },
    {
        headerName: '客户',
        field: 'customName',
        width: 150,
    },
    {
        headerName: '织布单号',
        field: 'planOrderCode',
        width: 150,
    },
    {
        headerName: '客户订单号',
        field: 'customOrderNo',
        width: 150,
    },
    {
        headerName: '坯布编号',
        field: 'greyCode',
        width: 150,
    },
    {
        headerName: '坯布名称',
        field: 'greyName',
        width: 150,
    },
    {
        headerName: '坯布批号',
        field: 'greyBatchNo',
        width: 150,
    },
    {
        headerName: '等级',
        field: 'grade',
        width: 150,
    },
    {
        headerName: '条形码',
        field: 'clothfiyCode',
        width: 150,
    },
    {
        headerName: '原料编号',
        field: 'rawmaterialCode',
        width: 200,
    },
    {
        headerName: '原料名称',
        field: 'rawmaterialName',
        width: 200,
    },
    {
        headerName: '纱批',
        field: 'yarnBatch',
        width: 200,
    },
    {
        headerName: '成品门幅',
        field: 'productWidth',
        width: 200,
    },
    {
        headerName: '成品克重',
        field: 'productGramWeight',
        width: 200,
    },
    {
        headerName: '针寸',
        field: 'workDrum',
        width: 200,
    },
    {
        headerName: '机布号',
        field: 'machineGreyCode',
        width: 200,
    },
    {
        headerName: '匹号',
        field: 'horseNo',
        width: 200,
    },
    {
        headerName: '重量',
        field: 'weight',
        width: 200,
    },
    {
        headerName: '布笼',
        field: 'shelveName',
        width: 200,
    },
    // {
    //     headerName: '检验日期',
    //     field: 'billDate',
    //     width: 200,
    //     // valueGetter: (params: any) => {
    //     //     return params.data.firstName + params.data.lastName;
    //     // } 使用此属性可以对数据进行处理
    // },
]
export {
    tableColumns,
    tableColumns1,
    tableColumns2,
    tableColumns3,
}